From 2e4ef0d6fd70e6edf5d258c453ebaf102e2e1b73 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Mon, 5 Mar 2007 15:08:17 +0000 Subject: [PATCH] linux/x86-64 2.6.18: reserve bootmem differently Do init memory reservation in a single step rather then piece-wise. This is not really addressing a problem, but simplifies things a little. Signed-off-by: Jan Beulich --- .../arch/x86_64/kernel/setup-xen.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c index 7410cf6574..f286359fd1 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c @@ -691,6 +691,14 @@ void __init setup_arch(char **cmdline_p) contig_initmem_init(0, end_pfn); #endif +#ifdef CONFIG_XEN + /* + * Reserve kernel, physmap, start info, initial page tables, and + * direct mapping. + */ + reserve_bootmem_generic(__pa_symbol(&_text), + (table_end << PAGE_SHIFT) - __pa_symbol(&_text)); +#else /* Reserve direct mapping */ reserve_bootmem_generic(table_start << PAGE_SHIFT, (table_end - table_start) << PAGE_SHIFT); @@ -699,12 +707,6 @@ void __init setup_arch(char **cmdline_p) reserve_bootmem_generic(__pa_symbol(&_text), __pa_symbol(&_end) - __pa_symbol(&_text)); -#ifdef CONFIG_XEN - /* reserve physmap, start info and initial page tables */ - reserve_bootmem_generic(__pa_symbol(&_end), - (table_start << PAGE_SHIFT) - - __pa_symbol(&_end)); -#else /* * reserve physical page 0 - it's a special BIOS page on many boxes, * enabling clean reboots, SMP operation, laptop functions. -- 2.30.2